package com.teach.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.teach.dto.ShopCartDTO;
import com.teach.entity.ShopCart;
import com.teach.mapper.ShopCartMapper;
import com.teach.service.shop.ShopGoodsCartService;
import com.teach.service.shop.ShopGoodsService;
@Service
public class ShopGoodsCartServiceImpl implements ShopGoodsCartService{

	@Override
	public List<ShopCart> get(String name) {
		
		return mapper.selectByName(name);
	}
	
	@Autowired
	private ShopCartMapper  mapper;

	@Override
	public int deleteCart(Long goodsName, String userName) {
		mapper.deleteGoodsId(goodsName, userName);
		return 0;
	}

	@Override
	public List<ShopCartDTO> selectShopCart(String shopCartUserName) {
		return mapper.selectShopCart(shopCartUserName);
	}


	
	
	
}
